package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.chargeconfig;
import com.ymttest.database.model.godmch.chargeconfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface chargeconfigMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @SelectProvider(type=chargeconfigSqlProvider.class, method="countByExample")
    int countByExample(chargeconfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @DeleteProvider(type=chargeconfigSqlProvider.class, method="deleteByExample")
    int deleteByExample(chargeconfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @Delete({
        "delete from chargeconfig",
        "where MchId = #{mchId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer mchId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @Insert({
        "insert into chargeconfig (MchId, WxApp, ",
        "LiveVideo, offlinepay,CreateTime, ",
        "UpdateTime)",
        "values (#{mchId,jdbcType=INTEGER}, #{wxApp,jdbcType=BIT}, ",
        "#{liveVideo,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(chargeconfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @InsertProvider(type=chargeconfigSqlProvider.class, method="insertSelective")
    int insertSelective(chargeconfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @SelectProvider(type=chargeconfigSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="MchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="WxApp", property="wxApp", jdbcType=JdbcType.BIT),
        @Result(column="LiveVideo", property="liveVideo", jdbcType=JdbcType.BIT),
        @Result(column="offlinepay", property="offlinepay", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<chargeconfig> selectByExample(chargeconfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @Select({
        "select",
        "MchId, WxApp, LiveVideo, offlinepay,CreateTime, UpdateTime",
        "from chargeconfig",
        "where MchId = #{mchId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="MchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="WxApp", property="wxApp", jdbcType=JdbcType.BIT),
        @Result(column="LiveVideo", property="liveVideo", jdbcType=JdbcType.BIT),
        @Result(column="offlinepay", property="offlinepay", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    chargeconfig selectByPrimaryKey(Integer mchId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @UpdateProvider(type=chargeconfigSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") chargeconfig record, @Param("example") chargeconfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @UpdateProvider(type=chargeconfigSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") chargeconfig record, @Param("example") chargeconfigExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @UpdateProvider(type=chargeconfigSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(chargeconfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table chargeconfig
     *
     * @mbggenerated Wed Dec 25 11:22:13 CST 2019
     */
    @Update({
        "update chargeconfig",
        "set WxApp = #{wxApp,jdbcType=BIT},",
          "LiveVideo = #{liveVideo,jdbcType=BIT},",
          "offlinepay = #{offlinepay,jdbcType=BIT},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where MchId = #{mchId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(chargeconfig record);
}